package gruppe7.data;

public interface UserProvider {

    /**
     * Returnerer et User objekt hvis brugernavn/passwordHash stemmer overens
     *
     * @param username
     * @param passwordHash
     * @return
     * @throws UserException, ProviderException
     */
    public User authenticateUser(String username, PasswordHash hash) throws UserException, ProviderException;

    /**
     * Kaster en exception hvis brugeren ikke kan oprettes
     * @param newUser
     * @return
     * @throws UserException, ProviderException
     */
    public void addUser(User newUser, PasswordHash hash) throws UserException, ProviderException;

    public boolean updateBalance(float value, String userName);

    public Float getBalance(String userName) throws UserException;
}
